package com.wing.delegate.controller;


import com.wing.common.utils.JsonResult;
import com.wing.delegate.service.DelegateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 畅捷通-材料出库-领料出库
 */
@Validated
@Api(value = "畅捷通-委外入库/出库管理", tags = "#/chanjet/delegate")
@RestController("DelegateController")
@RequestMapping("delegate/admin/delegate")
@RequiredArgsConstructor
public class DelegateController {

    @Resource
    DelegateService purchaseService;

    /**
     * 保存 委外发料单创建
     */
    @ApiOperation(value = "委外发料单创建", notes = "保存")
    @PostMapping("/syncAddMaterialDispatch")
    public JsonResult syncAddMaterialDispatch() {
        return JsonResult.success(purchaseService.syncOutDelegateDispatch());
    }



}
